Access procedures to nonvolatile EEPROMs are different from those to volatile Random Access Memories, or RAMs, and has a level of redundancy in order to assure that as much valid data as possible can be read out even if the data is destroyed by e.g. power failure while the data is being written.
For example, JP-A 9-293028 discloses one of such access procedures. According to this procedure, when writing a data to an EEPROM, a set of the data (backup data) and a mirror data created by inverting the bits of the data is written in a first memory region. Following this step, the same set of the backup data and the mirror data is written in a second memory region which is away from the first region by a predetermined address. According to this procedure, when reading the data from the EEPROM, first, the backup data and the mirror data from the first memory region are compared with each other. If an error is detected from the comparison, the backup data and the mirror data from the second memory region are compared. If the comparison suggests that the data from the second memory region is valid, the data from the second memory region can be read out for output.
Another example of the access procedure is disclosed in JP-A5-143468. According to this procedure, a first and a second memory regions (memory areas) are defined in an EEPROM. Firstly, the data and error correction codes are written in the first memory region. When the data is updated, the updated data and error correction codes are written in the second memory region. When the data is updated next time, the data and the error correction codes in the first memory region are overwritten. Likewise, in the next data update, the data and the error correction codes in the second memory region is overwritten. In other words, data writing is made alternately to the first and the second memory regions. According to this method, when data is read out from the EEPROM, the latest data and the error correction codes are read out from e.g. the second memory region. If verification using the error correction codes suggests that there is an error in the latest data which is read out, the old data which was updated earlier can be read out and outputted from the first memory region.
However, according to whichever of the methods described above, whether data is written to the first and the second memory regions sequentially or alternately, there is still a chance for a write failure occurring both in the first and the second memory regions if the power is turned off while the data is being written continuously from the first to the second region. This write failure occurs because a power breakdown does not result in an immediate loss of the power source voltage, but the voltage drops gradually, which sustain the writing operation for a period of time due to a fadeout effect. For this reason, write failure can occur in both of the two identical data or both of the two old and new data which are being written in the two different regions, i.e. the first and the second, memory regions, leading to a problem that no valid data is available after the power is restored.